﻿package com.firewolf.command.simplecommand;
/**
 * 扮演 Client
 * @author Administrator
 *
 */
public class SimpleRemoteControlTestMain { //命令模式的客户
	public static void main(String[] args) {
		SimpleRemoteControl remoteControl = new SimpleRemoteControl(); //命令的调用者
		Light light = new Light(); //创建一个接收者
		LightOnCommand lightOn = new LightOnCommand(light); //创建命令，将接收者传给他
		
		remoteControl.setCommand(lightOn); //把命令传给调用者
		remoteControl.buttonWasPressed(); //按下按钮
	}
}
